<html xmlns="http://java.sun.com/jsf/html">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>登陆页面</title>
    <script src="/js/jquery-1.8.3.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="/css/style.css" />
    <link type="text/css" rel="stylesheet" href="/css/style_grey.css" />
    <style>
        input[type=text] {
            width: 80%;
            height: 25px;
            font-size: 10pt;
            font-weight: bold;
            margin-left: 45px;
            padding-top: 7px;
            border-width: 0;
        }

        input[type=password] {
            width: 80%;
            height: 25px;
            font-size: 10pt;
            font-weight: bold;
            margin-left: 45px;
            padding-top: 7px;
            border-width: 0;
        }

        #loginform\:codeInput {
            margin-left: 1px;
            margin-top: 7px;
        }

        #loginform\:vCode {
            margin: 0px 0 0 60px;
            height: 34px;
        }
    </style>
    <script type="text/javascript">
        if(window.self != window.top){
            window.top.location = window.location;
        }
    </script>
    <!--自己实现ajax-->
    <script type="text/javascript">
        $(function() {
            $('#submitLogin').click(function() {

                $.ajax({
                    type:"POST",
                    url:"/user/checkLogin",
                    dataType: "json",
                    data: $("#loginform").serialize(),
                    success:function(data,status){
                        if(data.msg=="success"){
                            location.href="/pages/test.html";
                        }else if(data.msg=="error"){
                            location.href="/pages/LoginPage.html";
                        }
                    },
                    error:function () {
                        alert("失败");
                    }
                });
            });
        });
    </script>
</head>
<body>
<div
        style="width: 900px; height: 50px; position: absolute; text-align: left; left: 50%; top: 50%; margin-left: -450px;; margin-top: -280px;">
    <img src="/images/logo.png" style="border-width: 0; margin-left: 0;" />
    <span style="float: right; margin-top: 35px; color: #488ED5;">新BOS系统以宅急送开发的ERP系统为基础，致力于便捷、安全、稳定等方面的客户体验</span>
</div>
<div class="main-inner" id="mainCnt"
     style="width: 900px; height: 440px; overflow: hidden; position: absolute; left: 50%; top: 50%; margin-left: -450px; margin-top: -220px; background-image: url('../images/bg_login.jpg')">
    <div id="loginBlock" class="login"
         style="margin-top: 80px; height: 255px;">
        <div class="loginFunc">
            <div id="lbNormal" class="loginFuncMobile">员工登录</div>
        </div>
        <div class="loginForm">
            <form id="loginform" name="loginform" method="POST" class="niceform"
                  action="">
                <div id="idInputLine" class="loginFormIpt showPlaceholder"
                     style="margin-top: 5px;">
                    <input id="loginform:idInput" type="text" name="username"
                           class="loginFormTdIpt" maxlength="50" />
                    <label for="idInput" class="placeholder" id="idPlaceholder">帐号：</label>
                </div>
                <div class="forgetPwdLine"></div>
                <div id="pwdInputLine" class="loginFormIpt showPlaceholder">
                    <input id="loginform:pwdInput" class="loginFormTdIpt" type="password"
                           name="password" value="" />
                    <label for="pwdInput" class="placeholder" id="pwdPlaceholder">密码：</label>
                </div>
                <div class="loginFormIpt loginFormIptWiotTh"
                     style="margin-top:58px;">
                    <div id="codeInputLine" class="loginFormIpt showPlaceholder"
                         style="margin-left:0px;margin-top:-40px;width:50px;">
                        <input id="loginform:codeInput" class="loginFormTdIpt" type="text"
                               name="checkcode" title="请输入验证码">
                        <img id="loginform:vCode" src="/user/getValidateImg"
                             onclick="javascript:document.getElementById('loginform:vCode').src='/user/getValidateImg?'+Math.random();" />
                    </div>

                </div>
                <br>
                <div class="loginFormIpt loginFormIptWiotThh">
                <button type="button"  id="submitLogin" style="width: 79px;margin-right: 34px; height: 25px; padding-top: 3px; background-image: url('../images/loginatonce.gif')"></button>
                </div>
            </form>
        </div>
    </div>
</div>
<div
        style="width: 900px; height: 50px; position: absolute; text-align: left; left: 50%; top: 50%; margin-left: -450px;; margin-top: 220px;">
		</span><span style="float: right; color: #488ED5;">宅急送BOS系统</span>
</div>
</body>
</html>